import { createPinia } from 'pinia';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import './style.css';
// 主题样式
import './styles/theme.css';
// Element Plus 暗黑模式样式
import 'element-plus/theme-chalk/dark/css-vars.css';
import { useThemeStore } from './stores/theme';

const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

app.use(pinia);
app.use(router);

// 初始化主题
const themeStore = useThemeStore();
themeStore.initTheme();

app.mount('#app');
